package hotciv.framework;

import java.util.*;

/** Tile represents a single territory tile of a given type.

    Responsibilities:
    1) Know its type and position on the board.
    2) Know the set of units on it (possibly empty).
    3) Know the city (if any) on it.

 */

public interface Tile {
	
	/**
	 * add the Unit u to this Tiles datastructure
	 * @param u Unit to be stored in the ArrayList
	 */
	public boolean addUnit(Unit u);


	/**
	 * return the List of units placed at this tile.
	 */
	public List<Unit> getUnitList();
	
	/**
	 * return the unit in top of the tile
	 * @return Unit the topmost unit
	 */
	public Unit getTopUnit();
	
	/**
	 * removes the Unit received with getTopUnit
	 */
	public void removeTopUnit();

	/**
	 * add the City c to this Tiles datastructure
	 * @param c City to be stored in the ArrayList 
	 */

	public boolean addCity(City c);

	/**
	 * return the List of cities placed at this tile.
	 * At any time, only one city can be at a tile, so
	 * the list returned must maximum contain 1 element.
	 */
	public List<City> getCityList();
	
	/** return position of this tile on the board. 
	 * @return position of tile.
	 */
	public Position getPosition();

	/** return the tile type as a string. The set of
	 * valid strings are defined by the graphics
	 * engine, as they correspond to named image files.
	 * @return the type type as string
	 */
	public String getTypeString();
	
}
